<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<title>举报</title>

<link rel="stylesheet" href="__STATIC__mobile/css/article/w_complain251980.css">
<script src="__STATIC__mobile/js/jquery.js"></script>

</head>
<body class="zh_CN" >
<form id="form1">
	<div class="page_bd">
		<div id="tips" style="display: none;" class="top_tips warning"></div>

		<div id="step1" class="category_item">
			<h3 class="category_title">请选择举报原因</h3>

				<ul class="checkbox_list">
				
					<li data-type="1" class="checkbox">
					<input id="radio_1" name="complaintype" value="2" class="frm_checkbox" type="radio">
						<label for="radio_1" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">欺诈</div>
					</label></li>
					
					<li data-type="2" class="checkbox">
					<input id="radio_2" name="complaintype" value="1" class="frm_checkbox" type="radio">
						<label for="radio_2" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">色情</div>
					</label></li>
					
					<li data-type="3" class="checkbox">
					<input id="radio_3" name="complaintype" value="3" class="frm_checkbox" type="radio">
						<label for="radio_3" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">政治谣言</div>
					</label></li>
					
					<li data-type="4" class="checkbox">
					<input id="radio_4" name="complaintype" value="4" class="frm_checkbox" type="radio">
						<label for="radio_4" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">常识性谣言</div>
					</label></li>
					
					<li data-type="5" class="checkbox">
					<input id="radio_5" name="complaintype" value="5" class="frm_checkbox" type="radio">
						<label for="radio_5" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">诱导分享</div>
					</label></li>
					
					<li data-type="6" class="checkbox">
					<input id="radio_6" name="complaintype" value="6" class="frm_checkbox" type="radio">
						<label for="radio_6" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">恶意营销</div>
					</label></li>
					
					<li data-type="7" class="checkbox">
					<input id="radio_7" name="complaintype" value="7" class="frm_checkbox" type="radio">
						<label for="radio_7" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">隐私信息收集</div>
					</label></li>
					
					<!--  <li data-type="8" data-article="1" class="checkbox"><input
						id="radio_8" name="complaintype" value="reportpage"
						class="frm_checkbox" type="radio"> <label for="radio_8"
						class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">抄袭公众号文章</div>
					</label></li>-->
					
					<li data-type="9" class="checkbox">
					<input id="radio_9" name="complaintype" value="8" class="frm_checkbox" type="radio"> 
						<label for="radio_9" class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">其他侵权类（冒名、诽谤、抄袭）</div>
					</label></li>
					
					<!--  <li data-type="10" data-article="1" class="checkbox"><input
						id="radio_10" name="complaintype" value="original_complain"
						class="frm_checkbox" type="radio"> <label for="radio_10"
						class="frm_checkbox_label checkbox_title">
							<div class="checkbox_label_inner">违规声明原创</div>
					</label></li>-->
					
					
				</ul>
			
			<div class="opr_area">
				<a id="nextBtn" href="javascript:" class="btn btn_primary btn_disabled js_btn_submit">下一步</a>
			</div>
		</div>

<input type="hidden" name="from_url" value="<?php echo get('from_url');?>">
<input type="hidden" name="article_id" value="<?php echo get('article_id');?>">

		<div id="step2" class="category_item" style="display: none;">
			<h3 class="category_title">举报描述</h3>

				<div id="textareaDiv" class="textarea_panel">
					<textarea id="reasonText" maxlength=50 name="reasonText"></textarea>
					<i id="reasonTextTips" class="ic ic_warning ic_small"></i>
					 <span id="textareaLenSpan" class="frm_hint"><span id="textLen">0</span>/50</span>
				</div>
			
			<div class="opr_area">
				<a id="submitBtn" href="javascript:" class="btn btn_primary btn_disabled js_btn_submit">提交</a>
			</div>
		</div>
</form>

	<div id="step3" style="display: none;">

<div class="page_msg">
	<div class="icon_area"><i class="icon_msg success"></i></div>
	<div class="text_area">
		<h2 id="" class="title">举报成功</h2>
		<p id="suc_desc" class="desc">感谢你的参与，我们坚决反对色情、暴力、欺诈等违规信息，我们会认真处理你的举报，维护绿色、健康的网络环境。</p>
	</div>
	<div class="opr_area">
		<a id="successBtn_1" class="btn btn_primary" onclick="WeixinJSBridge.call('closeWindow');">确定</a>
	</div>
</div>

	</div>



<script>
$(function(){ 
		
		document.addEventListener('touchmove', function(e) {
		    e.preventDefault();
		});

		//提交举报第一步
		document.getElementById('nextBtn').addEventListener('click', function(e) {
			   var a = $("input[name='complaintype']:checked").val();
				if(a){
					$("#step1").hide();
					$("#step2").show();
				}else{
					$("#tips").text("请选择举报原因").show().delay(3000).fadeOut();
				}
		});
		
		//提交举报第2步
		document.getElementById('submitBtn').addEventListener('click', function(e) {
			   var content = $("#reasonText").val();
				if(content.length>0){
					$("#step2").hide();
					$("#step3").show();
				
					$.ajax({
						url : '/mobile/article/jubao/',
						type : 'post',
						dataType : 'json',
						data:$("#form1").serialize(),
						success : function(data) {
							//alert(data.msg);
						}
					});
					
					
				}else{
					$("#tips").text("请输入举报描述").show().delay(3000).fadeOut();
				}
		});
		

		//选择举报理由
		$(":radio").click(function(){
			var a = $("input[name='complaintype']:checked").val();
			if(a){
				$("#tips").hide();
				$("#nextBtn").removeClass("btn_disabled");
			}else{
				$("#nextBtn").addClass("btn_disabled");
			}
			
		});
		
		//输入理由
		$('#reasonText').bind('input propertychange', function() {
			var counter = $(this).val().length;
			if(counter>0){
				$("#submitBtn").removeClass("btn_disabled");
			}else{
				$("#submitBtn").addClass("btn_disabled");
			}
		    $('#textLen').text(counter);
		});
		
		
		
}); 

function onBridgeReady(){
	// WeixinJSBridge.call('hideOptionMenu');
	}

	if (typeof WeixinJSBridge == "undefined"){
	    if( document.addEventListener ){
	        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
	    }else if (document.attachEvent){
	        document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
	        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
	    }
	}else{
	    onBridgeReady();
	}
	
	</script>




</body>
</html>